﻿using Pay.TO;
using Pay.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO {

    /// <summary>
    /// 推广课程
    /// </summary>
    [Serializable]
    public class marketing_course_base_model {
        /// <summary>
        /// 课程Id
        /// </summary>
        public long id { get; set; }
    }
    /// <summary>
    /// 推广课程
    /// </summary>
    [Serializable]
    public class marketing_course_model {
        /// <summary>
        /// 课程Id
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 课程名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 课程地址
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 获得马力
        /// </summary>
        public int horse { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime update_time { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }
    }


    /// <summary>
    /// 推广课程列表
    /// </summary>
    [Serializable]
    public class marketing_course_list_model {
        /// <summary>
        /// 课程Id
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 课程名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 课程地址
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 视频时长总秒数
        /// </summary>
        public int time_seconds { get; set; }
        /// <summary>
        /// 视频时长
        /// </summary>
        public string time_title {
            get
            {
                if (time_seconds < 60)
                    return "00:" + time_seconds.ToString().PadLeft(2, '0');
                else
                    return ((int)(time_seconds / 60)).ToString().PadLeft(2, '0') + ":" + (time_seconds % 60).ToString().PadLeft(2, '0');
            }
        }

        /// <summary>
        /// 获得马力
        /// </summary>
        public int horse { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string status_title { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public long update_time_value { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime update_time { get; set; }
    }
}
